package com.zmzncs.lmtc.module.order.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zmzncs.lmtc.common.pojo.CurrOrderRes;
import com.zmzncs.lmtc.common.pojo.bolian.*;
import com.zmzncs.lmtc.module.order.pojo.order_info.OrderInfo;
import com.zmzncs.lmtc.module.order.pojo.order_info.OrderInfoDTO;
import com.zmzncs.lmtc.module.order.pojo.order_info.UserOrderInfoForm;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 客户-信息 服务类
 * </p>
 *
 * @author 任建波
 * @since 2020-09-01
 */
public interface OrderInfoService extends IService<OrderInfo> {

    /**查询客户当前车辆在停车场情况*/
    List<OrderInfoDTO> getCustomerCarParkList();
    /**查询客户订单*/
    IPage<OrderInfoDTO> getCustomerOrderPage(UserOrderInfoForm form);

    /**根据交易流水号查询订单是否支付成功*/
    boolean getOrderTradeRecordByTradeNo(String orderCode, String tradeNo);

    /**查询车主实时订单*/
    CurrOrderRes queryCurrOrder(String orderCode, String carNumber, Long parkId);
    /**泊链预支付*/
    BolianPrePayRes prePayCurrOrder(String orderCode);
    /**预支付通知结果*/
    Map prePayOrderNotice(String data);
    /**验证是否支持支付无感支付*/
    Map<String,Object> verifyNosencePay(String data);
    /**车辆进场通知结果*/
    Map<String,Object> carInPark(String data);
    /**车辆出场通知结果*/
    Map<String,Object> carOutPark(String data);
    /**无感支付通知结果*/
    Map<String,Object> noFeelOutParkNotice(String data);

    /**验证是否显示预支付*/
    boolean verifyDisplayPrePayButton(Long parkId,String carNum);

    /**校准泊链与中萌的交易记录，将中萌欠缺的交易记录补充完善*/
    BolianOrderHistoryRes calibrateHistoryData(String orderCode, String bolianParkUnionId, String bolianParkId, Integer parkSource, String carNum, Integer carOutPayType, Integer tradeType);

    /**非泊链出场判断是否无感抬杆*/
    Map<String, Object> carOutPay(String data);

    /**泊链请求查询道尔、盒子等的实时订单*/
    BolianParkCurrOrderRes getParkCurrOrder(String params);

    /**修改订单状态*/
    void updateOrderStatus(Long orderId, Long inTime, Long outTime, Long customerId, Integer outPayType, String tradeNo, String outPayMoney);

    /**处理车牌没有正常出场的订单*/
    void setNotOutOrder(String carNumber, Integer carOutPayType);

}
